package com.finna.tenant.dto.TenantAccountJoinDTO;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 租户及其账号列表响应
 */
@Data
public class TenantWithAccountsResponse {
    
    private Long id;
    
    private String tenantName;
    
    private String tenantAvatar;
    
    private Boolean isPublic;
    
    private Integer accountCount;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    
    /**
     * 账号列表
     */
    private List<AccountInTenant> accounts;
    
    @Data
    public static class AccountInTenant {
        private Long accountId;
        private String accountName;
        private String accountAvatar;
        private Long roleId;
        private String roleName;
        private String role;
        
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime joinedAt;
    }
}

